package logic.SysPerson

import cn.ibizlab.util.domain.EntityBase
import cn.ibizlab.util.helper.RuleUtils
import cn.ibizlab.util.security.AuthenticationUser
import cn.ibizlab.util.security.SpringContextHolder
import cn.ibizlab.core.ad.domain.SysPerson
import cn.ibizlab.core.ad.service.SysPersonService
import com.alibaba.fastjson.JSONObject
import org.springframework.util.ObjectUtils

/**
 *  清空pwd
 */
class ResetPwd {

    //当前用户
    def curuser = AuthenticationUser.getAuthenticationUser()
    //传入变量
    def _default
    //返回参数
    def _return

    def execute(arg) {
        println 'running....'
        _default = arg
        _return = arg
        begin()
        println 'running end....'
        return _return
    }

    //开始
    def begin() {
    
        //连接名称
        if(true) {
            deaction1()
        }
    }

    //实体行为
    def deaction1() {
        SpringContextHolder.getBean(SysPersonService.class).get(_default)

        if(true) {
            debugparam1()
        }
    }

    //调试逻辑参数
    def debugparam1() {
        println _default
        if(true) {
            prepareparam1()
        }
    }

    //准备参数
    def prepareparam1() {
        _default.set("user_password", null)

        if(true) {
            end1()
        }
    }

    //结束
    def end1() {
        _return = _default

    }

}
